package top.xchch.annotation;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import top.xchch.annotation.controller.UserController;
import top.xchch.annotation.repository.UserRepository;
import top.xchch.annotation.service.UserService;

public class Main {
	public static void main(String[] args) {
		ApplicationContext context = new ClassPathXmlApplicationContext("beans-annotation.xml");
		
//		TestObject to = (TestObject) context.getBean("testObject");
//		System.out.println(to);
		
		UserController userController = (UserController) context.getBean("userController");
		System.out.println(userController);
		userController.execute();
		
//		UserService userService = (UserService) context.getBean("userService");
//		System.out.println(userService);
		
//		UserRepository userRepository = (UserRepository) context.getBean("userRepository");
//		System.out.println(userRepository);
	}
}
